<% if (typeof data === 'object' && Array.isArray(data)) { %>
<div class="right-card">
  <div class="right-card-main">
    <div class="right-card-title">最新文章</div>
    <% if(data.length) { %>
    <div class="right-recommended">
      <a href="/dblog/note/v/detail.html?id=<%=data[0].id %>" title="<%=data[0].title %>" target="_blank">
        <% if(data[0].cover) { %>
        <img src="<%=data[0].cover %>" class="img-fluid" alt="<%=data[0].title %>">
        <% } else { %>
        <img src="/dblog/static/img/default-img.jpg" class="img-fluid" alt="<%=data[0].title %>">
        <% } %>
      </a>
    </div>
    <% } %>
    <ul class="right-recommended-list">
      <% for(var i = 1; i < data.length; i++) { %>
      <li>
        <a href="/dblog/note/v/detail.html?id=<%=data[i].id %>" title="<%=data[i].title %>" target="_blank"><i class="fa fa-angle-right" aria-hidden="true"></i><%=data[i].title %></a>
      </li>
      <% } %>
    </ul>
  </div>
</div>
<% } %>